const { Prisma } = require('prisma-binding')
const { typeDefs } = require('../generated/prisma/prisma-schema')

const isProd = process.env.NODE_ENV === 'production'

module.exports = {
  binding: new Prisma({
    typeDefs,
    endpoint: process.env['PRISMA_ENDPOINT'],
    secret: process.env['PRISMA_SECRET'],
    debug: !isProd
  })
}
